package com.his.bean;

import java.io.Serializable;
import java.util.Date;

/**
 * 绑定微信openid和用户id的关系
 * @TableName dzm_his_wxopenid
 */
public class DzmHisWxopenid implements Serializable {
    /**
     * 
     */
    private Integer id;

    /**
     * appid预留分表用
     */
    private String appid;

    /**
     * 微信openid
     */
    private String openid;

    /**
     * 用户id
     */
    private Integer userid;

    /**
     * 用户类型，0系统管理员，1诊所医院，2医生，3患者
     */
    private Boolean usertype;

    /**
     * 
     */
    private Date addtime;

    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Integer getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * appid预留分表用
     */
    public String getAppid() {
        return appid;
    }

    /**
     * appid预留分表用
     */
    public void setAppid(String appid) {
        this.appid = appid;
    }

    /**
     * 微信openid
     */
    public String getOpenid() {
        return openid;
    }

    /**
     * 微信openid
     */
    public void setOpenid(String openid) {
        this.openid = openid;
    }

    /**
     * 用户id
     */
    public Integer getUserid() {
        return userid;
    }

    /**
     * 用户id
     */
    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    /**
     * 用户类型，0系统管理员，1诊所医院，2医生，3患者
     */
    public Boolean getUsertype() {
        return usertype;
    }

    /**
     * 用户类型，0系统管理员，1诊所医院，2医生，3患者
     */
    public void setUsertype(Boolean usertype) {
        this.usertype = usertype;
    }

    /**
     * 
     */
    public Date getAddtime() {
        return addtime;
    }

    /**
     * 
     */
    public void setAddtime(Date addtime) {
        this.addtime = addtime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DzmHisWxopenid other = (DzmHisWxopenid) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAppid() == null ? other.getAppid() == null : this.getAppid().equals(other.getAppid()))
            && (this.getOpenid() == null ? other.getOpenid() == null : this.getOpenid().equals(other.getOpenid()))
            && (this.getUserid() == null ? other.getUserid() == null : this.getUserid().equals(other.getUserid()))
            && (this.getUsertype() == null ? other.getUsertype() == null : this.getUsertype().equals(other.getUsertype()))
            && (this.getAddtime() == null ? other.getAddtime() == null : this.getAddtime().equals(other.getAddtime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAppid() == null) ? 0 : getAppid().hashCode());
        result = prime * result + ((getOpenid() == null) ? 0 : getOpenid().hashCode());
        result = prime * result + ((getUserid() == null) ? 0 : getUserid().hashCode());
        result = prime * result + ((getUsertype() == null) ? 0 : getUsertype().hashCode());
        result = prime * result + ((getAddtime() == null) ? 0 : getAddtime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", appid=").append(appid);
        sb.append(", openid=").append(openid);
        sb.append(", userid=").append(userid);
        sb.append(", usertype=").append(usertype);
        sb.append(", addtime=").append(addtime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}